import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// 查询维修分组列表
export function listGroups(query) {
  return request({
    url: '/bysj/groups/list',
    method: 'get',
    params: query
  })
}

// 查询维修分组详细
export function getGroups(groupId) {
  return request({
    url: '/bysj/groups/' + praseStrEmpty(groupId),
    method: 'get'
  })
}

// 新增维修分组
export function addGroups(data) {
  return request({
    url: '/bysj/groups',
    method: 'post',
    data: data
  })
}

// 修改维修分组
export function updateGroups(data) {
  return request({
    url: '/bysj/groups',
    method: 'put',
    data: data
  })
}

// 删除维修分组
export function delGroups(groupId) {
  return request({
    url: '/bysj/groups/' + groupId,
    method: 'delete'
  })
}

// 导出维修分组
export function exportGroups(query) {
  return request({
    url: '/bysj/groups/export',
    method: 'get',
    params: query
  })
}
